import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {MyGradesComponent} from './my-grades.component';
import {ExamWrongTopicComponent} from './exam-wrong-topic/exam-wrong-topic.component';
import {ComponentLifeGuard} from '../../../core/services/common/guard/component-life.guard';

const routes: Routes = [
  {path: '', component: MyGradesComponent, data: {title: '我的成绩', key: 'my-grades', relatedLink: ['my-grades', 'exam-wrong-topic']}},
  {
    path: 'exam-wrong-topic/:userId/:questionTestId',
    canDeactivate: [ComponentLifeGuard],
    component: ExamWrongTopicComponent,
    data: {title: '我的成绩', key: 'exam-wrong-topic', relatedLink: ['my-grades', 'exam-wrong-topic']}
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MyGradesRoutingModule {
}
